Skip to content

Conversation

@pmenzel
Copy link
Contributor

@pmenzel pmenzel commented May 25, 2026

Might be just AI slop.

pmenzel and others added 2 commits May 25, 2026 10:44
mxqsub accepts --callback=SCRIPT (absolute path). The daemon runs
the script after every terminal outcome (finished, failed, killed,
unknown), as the submitting user in the job workdir, with MXQ_JOB_ID,
MXQ_GROUP_ID, MXQ_JOB_STATUS, and MXQ_JOB_WORKDIR in the environment.

Adds job_callback column to mxq_job; migration in migrate_019.
Also fixes mxq_set_job_status_unknown not updating job->job_status
in-struct, inconsistent with the other status-update functions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
}

int status;
if (waitpid(pid, &status, 0) == -1) {
Copy link
Contributor

@donald donald May 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we blocking the daemon here while the user script does its sleep infinity or whatever?

@@ -60,6 +60,10 @@ static void print_usage(void)
" -e, --stderr=FILE set file to capture stderr (default: <stdout>)\n"
" -u, --umask=MASK set mode to use as umask (default: current umask)\n"
" -p, --priority=PRIORITY set priority (default: 127)\n"
" -c, --callback=SCRIPT execute SCRIPT when the job finishes (any outcome)\n"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically it doesn't need to be a SCRIPT, because we execl() whatever executable it is, right?

@donald
Copy link
Contributor

donald commented May 27, 2026

The callback command is run without any constraint (time, memory, cpu).

Sign in to join this conversation on GitHub.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants